/**
  ETFAna project, Anyang Normal University && IMP-CAS
  \brief online via LAN, the Client part - receive data from LAN
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2023-08-02
  \date 2023-08-02 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2023-08-02   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021-2024 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#include <cstdlib>
#include <iostream>
#include <unistd.h>
#include <pthread.h>
#include <cstring>
#include <TStopwatch.h>
#include <TApplication.h>
#include "ETFParaManager.h"
#include "ETFOnlineSource.h"
#include "ETFReadShm.h"
#include "ETFPXIUnpacker.h"
#include "ETFVMEUnpacker.h"
#include "ETFUserAnaTask.h"
#include "ETFUnpackTask.h"
#include "ETFOnlineTask.h"
#include "ETFClient.h"
#include "ETFYaml.h"
#include "ETFRun.h"
#include "ETFMsg.h"

using std::cout;
using std::endl;

int main(int argc, char *argv[]){
  ETFRun *run = ETFRun::Instance();
  run->SetOnline();
  run->AddTask(new ETFOnlineTask());

	new TApplication("ETFAna_Online", &argc, argv);
  run->Init(); // init everything
  run->SetOnlineClean();
  run->Run();

  return 0;
} // end main
